\hypertarget{class_s_w2_a311___lib_1_1_object_to_file}{\section{S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-File Class Reference}
\label{class_s_w2_a311___lib_1_1_object_to_file}\index{S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-File@{S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-File}}
}


Klasse med metoderne til at skrive objekter til en fil.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_s_w2_a311___lib_1_1_object_to_file_a28924db0a396fe73f2b0c4dd5b47b511}{Object\-To\-File} ()
\item 
void \hyperlink{class_s_w2_a311___lib_1_1_object_to_file_a5736da0c541490555632c9f50b901974}{Serialize\-Object$<$ T $>$} (string filename, T object\-To\-Serialize)
\begin{DoxyCompactList}\small\item\em Metoden tager et filnavn og objektet der skal gemmes og skriver det i en fil med det givne navn. \end{DoxyCompactList}\item 
T \hyperlink{class_s_w2_a311___lib_1_1_object_to_file_a267bde809fc2ebd27e4028888be60498}{De\-Serialize\-Object$<$ T $>$} (string filename)
\begin{DoxyCompactList}\small\item\em Læser fra filen med det givne filnavn og returnerer et objekt med af den givne type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
Binary\-Formatter \hyperlink{class_s_w2_a311___lib_1_1_object_to_file_a778b06ded4e9f173c2627473214a9ef0}{b\-Formatter} = new Binary\-Formatter()
\begin{DoxyCompactList}\small\item\em Binary\-Formatter instantieres. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Klasse med metoderne til at skrive objekter til en fil. 

Serialisering er en indbygget funktionalitet i C\#. Biblioteket ligger i \char`\"{}\-System.\-Runtime.\-Serialization\char`\"{} og fungere ved at man omdanner et object til en strøm af bytes der efterfølgende kan skrives til en fil, memory eller over netværket. Når objektet serialiseres gemmes nogle data om objektet som dets type, asembly navn, version og de specifikke fields fra objektet man har valgt at serialisere. Hvilke fields der bliver gemt i byte-\/strømmen styres i de enkelte klasser og bliver derfor uddybet i dem. 

Definition at line 22 of file Serialization.\-cs.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_s_w2_a311___lib_1_1_object_to_file_a28924db0a396fe73f2b0c4dd5b47b511}{\index{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File}!Object\-To\-File@{Object\-To\-File}}
\index{Object\-To\-File@{Object\-To\-File}!SW2A311_Lib::ObjectToFile@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File}}
\subsubsection[{Object\-To\-File}]{\setlength{\rightskip}{0pt plus 5cm}S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-File.\-Object\-To\-File (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_w2_a311___lib_1_1_object_to_file_a28924db0a396fe73f2b0c4dd5b47b511}


Definition at line 29 of file Serialization.\-cs.



\subsection{Member Function Documentation}
\hypertarget{class_s_w2_a311___lib_1_1_object_to_file_a267bde809fc2ebd27e4028888be60498}{\index{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File}!De\-Serialize\-Object$<$ T $>$@{De\-Serialize\-Object$<$ T $>$}}
\index{De\-Serialize\-Object$<$ T $>$@{De\-Serialize\-Object$<$ T $>$}!SW2A311_Lib::ObjectToFile@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File}}
\subsubsection[{De\-Serialize\-Object$<$ T $>$}]{\setlength{\rightskip}{0pt plus 5cm}T S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-File.\-De\-Serialize\-Object$<$ T $>$ (
\begin{DoxyParamCaption}
\item[{string}]{filename}
\end{DoxyParamCaption}
)}}\label{class_s_w2_a311___lib_1_1_object_to_file_a267bde809fc2ebd27e4028888be60498}


Læser fra filen med det givne filnavn og returnerer et objekt med af den givne type. 

Den tager alle slags objekter (T) hvis bare objektet er forberedt til serialisering. 


\begin{DoxyTemplParams}{Template Parameters}
{\em T} & \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em filename} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}


Definition at line 57 of file Serialization.\-cs.

\hypertarget{class_s_w2_a311___lib_1_1_object_to_file_a5736da0c541490555632c9f50b901974}{\index{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File}!Serialize\-Object$<$ T $>$@{Serialize\-Object$<$ T $>$}}
\index{Serialize\-Object$<$ T $>$@{Serialize\-Object$<$ T $>$}!SW2A311_Lib::ObjectToFile@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File}}
\subsubsection[{Serialize\-Object$<$ T $>$}]{\setlength{\rightskip}{0pt plus 5cm}void S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-File.\-Serialize\-Object$<$ T $>$ (
\begin{DoxyParamCaption}
\item[{string}]{filename, }
\item[{T}]{object\-To\-Serialize}
\end{DoxyParamCaption}
)}}\label{class_s_w2_a311___lib_1_1_object_to_file_a5736da0c541490555632c9f50b901974}


Metoden tager et filnavn og objektet der skal gemmes og skriver det i en fil med det givne navn. 

Den tager alle slags objekter (T) hvis bare objektet er forberedt til serialisering. 


\begin{DoxyTemplParams}{Template Parameters}
{\em T} & \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em filename} & \\
\hline
{\em object\-To\-Serialize} & \\
\hline
\end{DoxyParams}


Definition at line 42 of file Serialization.\-cs.



\subsection{Member Data Documentation}
\hypertarget{class_s_w2_a311___lib_1_1_object_to_file_a778b06ded4e9f173c2627473214a9ef0}{\index{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File}!b\-Formatter@{b\-Formatter}}
\index{b\-Formatter@{b\-Formatter}!SW2A311_Lib::ObjectToFile@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-File}}
\subsubsection[{b\-Formatter}]{\setlength{\rightskip}{0pt plus 5cm}Binary\-Formatter S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-File.\-b\-Formatter = new Binary\-Formatter()\hspace{0.3cm}{\ttfamily [private]}}}\label{class_s_w2_a311___lib_1_1_object_to_file_a778b06ded4e9f173c2627473214a9ef0}


Binary\-Formatter instantieres. 



Definition at line 27 of file Serialization.\-cs.



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
S\-W2\-A311\-\_\-\-Lib/\hyperlink{_serialization_8cs}{Serialization.\-cs}\end{DoxyCompactItemize}
